# -*- coding:utf-8 -*-
"""
    daily run main program 
    @Author:ibunny
    @Date: 2021.02.26
"""

from __future__ import division, print_function
import os
import crawler 
import datetime

if __name__ == "__main__":
    current_path = os.getcwd()
    print('current_path:',current_path)
    print('current_time:', datetime.datetime.now())
    fund_code_input_file = os.path.join(current_path, 'data/fund_code_input.csv')
    crawler = crawler.FundCrawler(fund_code_input_file)
    crawler.query_funds_info()
    crawler.save_funds_info()
    crawler.send_fund_info_to_mail()

